﻿<%@ Page Title="" Language="C#" MasterPageFile="../Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SailHero.Soft.FrameWork.Models.SYS_USER>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="head" runat="server">
    <link href="<%=Page.ResolveUrl("../../Content/css/jquery-ui-1.8.14.custom.css")%>" rel="stylesheet" type="text/css" />
    <script src="<%=Page.ResolveUrl("../../Scripts/jquery.ui.core.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("../../Scripts/jquery.ui.datepicker.js")%>" type="text/javascript"></script>
    
    
    
    <script type="text/javascript">

        $(function () {

        $("#cancel").click(function (){
        window.location="/user/index";
        });
            SelectDate();

            $("#submit,#MainContent_save").click(function () {
                var userAccount = $("#Account").val();
                var userName = $("#UserCName").val();
                var userDept = $("#ddlDept").val();
                if (userAccount == "") {
                    $.messager.alert("提示信息", "用户帐号不能为空", "info");
                    return false;
                }
                else if (userName == "") {
                    $.messager.alert("提示信息", "用户姓名不能为空", "info");
                    return false;
                }
                else if (userDept == "-1") {
                    $.messager.alert("提示信息", "请选择所在部门", "info");
                    return false;
                }
                else {
                    return true;
                }
            });
        });

        function SelectDate() {
            dates = $("#BirthDay").datepicker({
                dateFormat: 'yy-mm-dd',
                showOn: "button",
                buttonImage: "<%=Page.ResolveUrl("../../Content/images/calendar.gif")%>",
                buttonImageOnly: true,
                defaultDate: "",
                changeMonth: true,
                changeYear: true,
                numberOfMonths: 1,
                showOn: 'both',
                showButtonPanel: true,
                showClearButton: true
            });
        }
    </script>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="TabTitle" runat="server">
新增用户
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="main_zone">
<% using (Html.BeginForm())
   { %>
  <table width="99%" style="text-align:left;" border="0" align="center"  cellpadding="3" cellspacing="1">
      <tr>
          <td width="18%" class="left_title_1">
             <font color="red">*</font>&nbsp;用户帐号
          </td>
          <td width="32%"> <%: Html.EditorFor(model => model.ACCOUNT)%>
          </td>
          <td width="18%" class="left_title_1">
               <font color="red">*</font>&nbsp;姓名
          </td>
          <td width="32%"><%: Html.EditorFor(model => model.USERCNAME)%>
          </td>
      </tr>
    <tr>
      <td class="left_title_2"> <font color="red">*</font>&nbsp;部门</td>
      <td>  <%=Html.DropDownList("deptList")%></td>
      <td class="left_title_2">&nbsp;生日</td>
      <td>  <%: Html.EditorFor(model => model.BIRTHDAY)%></td>
    </tr>
    <tr>
      <td class="left_title_1">电话</td>
      <td>
         <%: Html.EditorFor(model => model.TELEPHONE)%>
      </td>
       <td class="left_title_1">移动电话</td>
      <td> <%: Html.EditorFor(model => model.MOBILE)%></td>
    </tr>
    <tr>
      <td class="left_title_2">邮箱</td>
      <td> <%: Html.EditorFor(model => model.EMAIL)%></td>
      <td class="left_title_2">工号</td>
      <td> <%: Html.EditorFor(model => model.JOBNUMBER)%></td>
    </tr>
    <tr>
          <td class="left_title_1">
              性别
          </td>
          <td>
              <input id="chkSexMan" name="sex" checked="checked" value="1" type="radio" />男
              <input id="chkSexWoman" name="sex" type="radio" value="0" />女
          </td>
          <td class="left_title_1">
              是否可用
          </td>
          <td><input id="isEnable" name="isEnable" checked="checked" type="checkbox" />
          </td>
      </tr>
    <tr>
      <td colspan="4" class="left_title_2" style="text-align:center;">
      <input id="submit" type="submit" value="保存" />
       <input id="cancel" type="button" value="取消" />
      </td>
    </tr> 
  </table>
  <%} %>
</div>

</asp:Content>



